package org.master.subversion;


public class ClassA {
    private String atributo1;
    private Integer atributo2;

    public ClassA() {
        super();
        this.atributo1 = null;
        this.atributo2 = null;
    }

    public void setAtributo1(String atributo1) {
        this.atributo1 = atributo1;
    }

    public String getAtributo1() {
        return atributo1;
    }

    public void setAtributo2(Integer atributo2) {
        this.atributo2 = atributo2;
    }

    public Integer getAtributo2() {
        return atributo2;
    }


    @Override
    public boolean equals(Object object) {
        return super.equals(object);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

    public void incrementaAtributo2(int incremento) {
        if (atributo2 != null)
            atributo2 = atributo2 * incremento;
        else
            atributo2 = new Integer(1);
    }

    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer("Objeto de la clase A");
        sb.append("\n - Atributo 1...: ").append(atributo1);
        sb.append("\n - Atributo 2...: ").append(atributo2);
        return sb.toString();
    }
}
